load("@fbcode_macros//build_defs:cpp_python_extension.bzl", "cpp_python_extension")
load("@fbcode_macros//build_defs:python_library.bzl", "python_library")

oncall("scm_client_infra")

python_library(
    name = "lib",
    srcs = glob(["*.py"]),
    os_deps = [
        (
            "windows",
            [
                ":ntapi",
            ],
        ),
    ],
    deps = [
        "fbsource//third-party/pypi/pexpect:pexpect",
        "//eden/fs/cli:lib",
        "//eden/fs/cli:proc_utils",
        "//eden/fs/py/eden:config",
        "//eden/fs/py/eden/thrift:client",
        "//eden/fs/py/eden/thrift:legacy",
        "//eden/fs/py/eden/thrift:windows_thrift",
        "//eden/fs/service:thrift-py-deprecated",
        "//eden/fs/service:thrift-python-clients",
        "//eden/fs/service:thrift-python-services",
        "//eden/fs/service:thrift-python-types",
        "//eden/integration/facebook/lib:lib",
        "//eden/test_support:py",
        "//fb303/thrift:fb303_core-py-deprecated",
        "//thrift/lib/python:types",
    ],
)

cpp_python_extension(
    name = "ntapi",
    srcs = ["ntapi.cpp"],
    base_module = "eden.integration.lib",
    compatible_with = [
        "ovr_config//os:windows",
    ],
    compiler_flags = [
        "-Wno-missing-field-initializers",
        "-Wno-unused-parameter",
    ],
    types = [
        "ntapi.pyi",
    ],
)
